package bigdata.monitor.binlog.entity;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("monitor_result")
public class MonitorResult {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    @JSONField(name = "database_name")
    private String databaseName;
    @JSONField(name = "table_name")
    private String tableName;
    @JSONField(name = "primary_key")
    private String primaryKey;
    @JSONField(name = "batch_id")
    private String batchId;
    @JSONField(name = "rule_name")
    private String ruleName;
    @JSONField(name = "rule_code")
    private String ruleCode;      // 规则编码
    @JSONField(name = "changed_fields")
    private String changedFields; // JSON字符串
    @JSONField(name = "create_time")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}

